#include <iostream>
#include <algorithm>
using namespace std;

const int N = 400, M = 400;
typedef long long LL;

bool map[N][M];
LL dp[N][M];
bool st[N][M];
pair<int, int> q[M];

int dx[] = { 0, -2, -2, -1, -1,  1,  1,  2,  2 };
int dy[] = { 0, -1,  1, -2,  2, -2,  2, -1,  1 };
int ddx[] = { 0, 1, 0 }, ddy[] = { 0, 0, 1 };

int main()
{
    int n, m, x, y;
    cin >> n >> m >> x >> y;
    n++, m++, x++, y++;

    map[x][y] = true;
    for (int i = 1; i <= 8; i++)
    {
        int a = x + dx[i], b = y + dy[i];
        if (a >= 1 && a <= n && b >= 1 && b <= m)
            map[a][b] = true;
    }

    q[0] = { 1, 1 };
    dp[1][1] = 1;
    int hh = 0, tt = 0;
    while (hh <= tt)
    {
        auto t = q[hh++];
        for (int i = 1; i <= 2; i++)
        {
            int a = t.first + ddx[i], b = t.second + ddy[i];
            if (a >= 1 && a <= n && b >= 1 && b <= m && !map[a][b])
            {
                dp[a][b] = dp[a - 1][b] + dp[a][b - 1];
                if (!st[a][b])
                    q[++tt] = { a, b }, st[a][b] = true;
            }
        }
    }
    cout << dp[n][m] << endl;
    return 0;
}